<template>
	<view class="conter">
		<view class="tabs">
			<u-tabs style="margin-left: 34.88rpx" lineColor="#46a6f8" :activeStyle="{
						color: '#FFFFFF',
						fontSize: '30rpx'
					}" :inactiveStyle="{
						color: '#8A92A3',
						fontSize: '26rpx'
					}" :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
		</view>
		<view class="Fucking" v-if="current == 0">
			<u-tabs style="margin-left: 34.88rpx" lineColor="#46a6f8" :activeStyle="{
						color: '#FFFFFF',
						fontSize: '30rpx',
						width: '50px',
						textAlign: 'center'
					}" :inactiveStyle="{
						color: '#8A92A3',
						fontSize: '26rpx',
						width: '50px',
						textAlign: 'center'
					}" :list="list1" :current="current1" @change="change1"></u-tabs>
			<view class="Fucking" v-if="current1 == 0">
				<marketorder v-if="isShow"></marketorder>
				<!-- duck -->
			</view>
			<view class="Fucking" v-if="current1 == 1">
				<shiorder v-if="isShow"></shiorder>
				<!-- 金豆 -->
			</view>
		</view>
		<view class="Fucking" v-if="current == 1">
			<hotorder v-if="isShow"></hotorder>
			<!-- 热卖 -->
		</view>
	</view>
</template>

<script>
	import marketorder from '../../components/myorder/marketorder.vue';
	import shiorder from '../../components/myorder/shiorder.vue';
	import hotorder from '../../components/myorder/hotorder.vue';
	import config from '@/config.js';
	export default {
		components: {
			marketorder,//duck
			shiorder, //金豆
			hotorder, //热卖
		},
		data() {
			return {
				list: [{
						name: '市场'
					},
					{
						name: '首发'
					}
				],
				list1: [{
						name: 'duck'
					},
					{
						name: '金豆'
					}
				],
				current: 0,
				current1: 0,
				isShow: true,
				imgUrl: config.gillUrl
			};
		},
		created() {
			uni.$on('componentShow', () => {});
		},
		onShow() {
			this.isShow = true;
		},
		onHide() {
			this.isShow = false;
		},
		methods: {
			change(index) {
				this.current = index.index;
			},
			change1(index1) {
				// 页面A中
				this.current1 = index1.index;
			}
		}
	};
</script>
<style lang="scss">
	.conter {
		.tabs {
			width: 500rpx;
		}
	}
</style>